package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.IStrategyCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 攻略点评的回显
 */
@RestController
@RequestMapping("comments")
public class CommentController {
    @Autowired
    private IStrategyCommentService strategyCommentService;

    @GetMapping("{strategyId}")
    public Object selectAllMessage(@PathVariable Long strategyId) {
        return strategyCommentService.selectAllMessage(strategyId);
    }
    @GetMapping("{commentId}/particulars")
    public Object selectByCommentId(@PathVariable Long commentId) {
        return strategyCommentService.selectByCommentId(commentId);
    }
}
